home *** CD-ROM | disk | FTP | other *** search
/ Agent Central Host Computer / Agent - Central Host Computer.iso / _SETUP.1 / sec_levels.sql < prev    next >
Text File  |  2000-05-12  |  1KB  |  28 lines

  1. /* RCSVER $Id: sec_levels.sql,v 1.2 1999-02-24 15:12:23-06 randy CURRENT $ */
  2. /* *************************************************************************
  3. *        Copyright (C) 1998, Agent Systems, Inc. All Rights Reserved.
  4. *
  5. * Name:        sec_levels.sql
  6. * Date:        02/17/1999
  7. * memo:        Randy Wood
  8. * Description:    Create the sec_levels table. This table contains a list
  9. *        of security levels by user id. If no entry exists in
  10. *           this table for a user, the security level for that
  11. *        user is taken from the opsecurities table.
  12. * Changes:
  13. ************************************************************************* */
  14. CREATE TABLE sec_levels
  15. (
  16.     user_id        NUMBER(38)    /* ID of user */
  17.             CONSTRAINT ref1_seclevels REFERENCES 
  18.             users(user_id) ON DELETE CASCADE,
  19.     subsys_id    NUMBER(38)    /* Subsystem for this sec. level */
  20.             CONSTRAINT ref2_seclevels REFERENCES 
  21.             subsystems(id) ON DELETE CASCADE,
  22.     security_level    NUMBER(38),    /* security level for user */
  23.     CONSTRAINT fk_seclevels FOREIGN KEY (subsys_id, security_level) 
  24.         REFERENCES subsecurities(subsys_id, sec_level) 
  25.         ON DELETE CASCADE, 
  26.     CONSTRAINT pk_seclevels PRIMARY KEY (user_id, subsys_id)
  27. );
  28.